Student Details
Your Name is:::
Your RegNo is:::
prepare("select * from student where regno =:reg") ; $sql->bindparam(":reg",$regno) ; $sql->execute() ; if($sql->rowcount() > 0) { $rowa = $sql->FETCH(PDO::FETCH_ASSOC) ; $fname = $rowa['surname'] ; $md = $rowa['middlename'] ; $ln = $rowa['lastname'] ; $studname = $fname.' '.$md.' '.$ln ; $avat = $rowa['avatar'] ; } if(isset($_POST['first'])) { $msg = array() ; $pin = $_SESSION['pin'] ; $regno = $_SESSION['rgno'] ; $_SESSION["schsesion"] = trim($_POST['yr']); $_SESSION["term"] = 'FIRST TERM' ; $classid = $_SESSION["classid"] ; //mysql_select_db("$database", $conn); $schyear = $_SESSION["schsesion"] ; $classid = $_SESSION["classid"] ; $term = $_SESSION["term"] ; //$level = substr($classid, 0, 7); //$level1 = substr($classid, 0, 2); //check pin validity $sql1 = $DBcon->prepare("select * from pinassociate where PINCODE =:p") ; $sql1->bindparam(':p', $pin) ; $sql1->execute() ; $rc = $sql1->rowcount() ; if($rc > 0) { $row1 = $sql1->FETCH(PDO::FETCH_ASSOC) ; $pin = $row1['PINCODE'] ; $owner = $row1['REGNO'] ; $numbused = $row1['NOUSED'] ; $tm = $row1['TERM'] ; $yr = $row1['acadsession'] ; //check reg no if($numbused >= 5) $msg[] = 'You have used this Pin above its Limit please buy another Card' ; if($term != $tm) $msg[] = 'You have used this Pin to Check another Term Result, Please Get another Card' ; if($yr != $schyear) $msg[] = 'You have used this Pin to Check another Session Result, Please Get another Card' ; }// end if access, i.e, if pin exist if(empty($msg)) { $sqlc = $DBcon->prepare(" select * from marks where (stregno =:rg and acad_session =:yr) and (term =:tm and stclass = :cs)") ; $sqlc->bindparam(':rg', $regno) ; $sqlc->bindparam(':yr', $schyear) ; $sqlc->bindparam(':tm', $term) ; $sqlc->bindparam(':cs', $classid) ; $sqlc->execute() ; $rcx = $sqlc->rowcount() ; //$resultc = mysql_query($sqlc) or die('Error: ' . mysql_error()); if($rcx > 0) { $rowc = $sqlc->FETCH(PDO::FETCH_ASSOC) ; $resultnoc = $rowc['stregno'] ; $_SESSION["getresultc"] = $resultnoc ; } else $msg[] = 'Sorry, Your Result is not Ready or Make Sure you entered correct Information' ; } if(empty($msg)) header("location: resultsheet/basicsheet.php"); } if(isset($_POST['second'])) { $msg = array() ; $pin = $_SESSION['pin'] ; $regno = $_SESSION['rgno'] ; $_SESSION["schsesion"] = trim($_POST['yr']); $_SESSION["term"] = 'SECOND TERM' ; $classid = $_SESSION["classid"] ; //mysql_select_db("$database", $conn); $schyear = $_SESSION["schsesion"] ; $classid = $_SESSION["classid"] ; $term = $_SESSION["term"] ; //$level = substr($classid, 0, 7); //$level1 = substr($classid, 0, 2); //check pin validity $sql1 = $DBcon->prepare("select * from pinassociate where PINCODE =:p") ; $sql1->bindparam(':p', $pin) ; $sql1->execute() ; $rc = $sql1->rowcount() ; if($rc > 0) { $row1 = $sql1->FETCH(PDO::FETCH_ASSOC) ; $pin = $row1['PINCODE'] ; $owner = $row1['REGNO'] ; $numbused = $row1['NOUSED'] ; $tm = $row1['TERM'] ; $yr = $row1['acadsession'] ; //check reg no if($numbused >= 5) $msg[] = 'You have used this Pin above its Limit please buy another Card' ; if($term != $tm) $msg[] = 'You have used this Pin to Check another Term Result, Please Get another Card' ; if($yr != $schyear) $msg[] = 'You have used this Pin to Check another Session Result, Please Get another Card' ; }// end if access, i.e, if pin exist if(empty($msg)) { $sqlc = $DBcon->prepare(" select * from marks where (stregno =:rg and acad_session =:yr) and (term =:tm and stclass = :cs)") ; $sqlc->bindparam(':rg', $regno) ; $sqlc->bindparam(':yr', $schyear) ; $sqlc->bindparam(':tm', $term) ; $sqlc->bindparam(':cs', $classid) ; $sqlc->execute() ; $rcx = $sqlc->rowcount() ; //$resultc = mysql_query($sqlc) or die('Error: ' . mysql_error()); if($rcx > 0) { $rowc = $sqlc->FETCH(PDO::FETCH_ASSOC) ; $resultnoc = $rowc['stregno'] ; $_SESSION["getresultc"] = $resultnoc ; } else $msg[] = 'Sorry, Your Result is not Ready or Make Sure you entered correct Information' ; } if(empty($msg)) header("location: resultsheet/basicsheet.php"); } if(isset($_POST['third'])) { $msg = array() ; $pin = $_SESSION['pin'] ; $regno = $_SESSION['rgno'] ; $_SESSION["schsesion"] = trim($_POST['yr']); $_SESSION["term"] = 'THIRD TERM' ; $classid = $_SESSION["classid"] ; //mysql_select_db("$database", $conn); $schyear = $_SESSION["schsesion"] ; $classid = $_SESSION["classid"] ; $term = $_SESSION["term"] ; //$level = substr($classid, 0, 7); //$level1 = substr($classid, 0, 2); //check pin validity $sql1 = $DBcon->prepare("select * from pinassociate where PINCODE =:p") ; $sql1->bindparam(':p', $pin) ; $sql1->execute() ; $rc = $sql1->rowcount() ; if($rc > 0) { $row1 = $sql1->FETCH(PDO::FETCH_ASSOC) ; $pin = $row1['PINCODE'] ; $owner = $row1['REGNO'] ; $numbused = $row1['NOUSED'] ; $tm = $row1['TERM'] ; $yr = $row1['acadsession'] ; //check reg no if($numbused >= 5) $msg[] = 'You have used this Pin above its Limit please buy another Card' ; //if($term != $tm) $msg[] = 'You have used this Pin to Check another Term Result, Please Get another Card' ; if($yr != $schyear) $msg[] = 'You have used this Pin to Check another Session Result, Please Get another Card' ; }// end if access, i.e, if pin exist if(empty($msg)) { $sqlc = $DBcon->prepare(" select * from marks where (stregno =:rg and acad_session =:yr) and (term =:tm and stclass = :cs)") ; $sqlc->bindparam(':rg', $regno) ; $sqlc->bindparam(':yr', $schyear) ; $sqlc->bindparam(':tm', $term) ; $sqlc->bindparam(':cs', $classid) ; $sqlc->execute() ; $rcx = $sqlc->rowcount() ; //$resultc = mysql_query($sqlc) or die('Error: ' . mysql_error()); if($rcx > 0) { $rowc = $sqlc->FETCH(PDO::FETCH_ASSOC) ; $resultnoc = $rowc['stregno'] ; $_SESSION["getresultc"] = $resultnoc ; } else $msg[] = 'Sorry, Your Result is not Ready or Make Sure you entered correct Information' ; } if(empty($msg)) header("location: resultsheet/basicsheet.php"); } // check annual if(isset($_POST['annual'])) { $msg = array() ; $pin = $_SESSION['pin'] ; $regno = $_SESSION['rgno'] ; $_SESSION["schsesion"] = trim($_POST['yr']); $_SESSION["term"] = 'ANNUAL TERM' ; $classid = $_SESSION["classid"] ; //mysql_select_db("$database", $conn); $schyear = $_SESSION["schsesion"] ; $classid = $_SESSION["classid"] ; //$term = $_SESSION["term"] ; $sqlc = $DBcon->prepare(" select * from marks where (stregno =:rg and acad_session =:yr) and (stclass = :cs )") ; $sqlc->bindparam(':rg', $regno) ; $sqlc->bindparam(':yr', $schyear) ; //$sqlc->bindparam(':tm', $term) ; $sqlc->bindparam(':cs', $classid) ; $sqlc->execute() ; $rcx = $sqlc->rowcount() ; //$resultc = mysql_query($sqlc) or die('Error: ' . mysql_error()); if($rcx > 0) { $rowc = $sqlc->FETCH(PDO::FETCH_ASSOC) ; $resultnoc = $rowc['stregno'] ; $_SESSION["getresultcm"] = $resultnoc ; } else $msg[] = 'Sorry Your Result is not ready, check back next week' ; //check pin $sql1 = $DBcon->prepare("select * from pinassociate where PINCODE =:p") ; $sql1->bindparam(':p', $pin) ; $sql1->execute() ; $rc = $sql1->rowcount() ; if($rc > 0) { $row1 = $sql1->FETCH(PDO::FETCH_ASSOC) ; $pin = $row1['PINCODE'] ; $owner = $row1['REGNO'] ; $numbused = $row1['NOUSED'] ; // $tm = $row1['TERM'] ; $yr = $row1['acadsession'] ; //check reg no if($numbused >= 5) $msg[] = 'You have used this Pin above its Limit please buy another Card' ; //if($term != $tm) $msg[] = 'You have used this Pin to Check another Term Result, Please Get another Card' ; if($yr != $schyear) $msg[] = 'You have used this Pin to Check another Session Result, Please Get another Card' ; }// end if access, i.e, if pin exist if(empty($msg)) header("location: resultsheet/pjsheet.php"); } ?>
Your Name is:::
Your RegNo is:::